def call(robot, arch, branch, distro, version){

    def d200RobotTemplate = [
        'label' : [
            'x86_64' : [
                '16.04' : "ROBOT_D200_X86_64_16.04_${version}"
            ],
            'aarch64' : [
                '16.04' : "ROBOT_D200_AARCH64_16.04_${version}",
                '18.04' : "ROBOT_D200_AARCH64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:ipc_x86_64_16.04_opencv_4.5.0_java17'
            ],
            'aarch64' : [
                '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:arm_ptz_aarch64_16.04',
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:tail_aarch64_18.04'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_xenial', mountPath: '/home/jenkins/agent/workspace')]
            ],
            'aarch64' : [
                '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/aarch64_xenial', mountPath: '/home/jenkins/agent/workspace'),hostPathVolume(hostPath: '/usr/bin/qemu-aarch64-static', mountPath: '/usr/bin/qemu-aarch64-static')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/D200/D200Robot',
                    'url' : 'ssh://git@192.168.9.61:10022/d200/D200Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/D200Robot'
                ],
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Slam',
                    'url' : 'ssh://git@192.168.9.61:10022/slam/Slam.git',
                    'branch' : 'slam_imu',
                    'targetDir' : 'src/Slam'
                ],
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Moveit',
                    'url' : 'ssh://git@192.168.9.61:10022/d200/Moveit.git',
                    'branch' : 'kinetic-devel',
                    'targetDir' : 'src/Moveit'
                ]
            ],
            'aarch64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/D200/D200Robot',
                    'url' : 'ssh://git@192.168.9.61:10022/d200/D200Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/D200Robot'
                ]
            ]
        ],
        'buildScript' : "src/D200Robot/scripts/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/D200Robot/scripts/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/D200Robot/scripts/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/D200/D200Robot",
        'cherryPickDir' : "src/D200Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "D200Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a3192560-003e-474e-bbcc-baa8eb4da1a9'
    ]

    def d200RobotTemplate2 = [
            'label' : [
                    'x86_64' : [
                            '16.04' : "ROBOT_D200_X86_64_16.04_${version}"
                    ],
                    'aarch64' : [
                            '16.04' : "ROBOT_D200_AARCH64_16.04_${version}",
                            '18.04' : "ROBOT_D200_AARCH64_18.04_${version}"
                    ]
            ],
            'image' : [
                    'x86_64' : [
                            '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:ipc_x86_64_16.04_opencv_4.5.0_java17'
                    ],
                    'aarch64' : [
                            '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:arm_ptz_aarch64_16.04',
                            '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:tail_aarch64_18.04'
                    ]
            ],
            'volumes' : [
                    'x86_64' : [
                            '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_xenial', mountPath: '/home/jenkins/agent/workspace')]
                    ],
                    'aarch64' : [
                            '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/aarch64_xenial', mountPath: '/home/jenkins/agent/workspace'),hostPathVolume(hostPath: '/usr/bin/qemu-aarch64-static', mountPath: '/usr/bin/qemu-aarch64-static')]
                    ]
            ],
            'gitUrl' : [
                    'x86_64' : [
                            [
                                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/D200/D200Robot',
                                    'url' : 'ssh://git@192.168.9.61:10022/d200/D200Robot.git',
                                    'branch' : branch,
                                    'targetDir' : 'src/D200Robot'
                            ],
                            [
                                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Slam',
                                    'url' : 'ssh://git@192.168.9.61:10022/slam/Slam.git',
                                    'branch' : 'slam',
                                    'targetDir' : 'src/Slam'
                            ],
                            [
                                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Moveit',
                                    'url' : 'ssh://git@192.168.9.61:10022/d200/Moveit.git',
                                    'branch' : 'kinetic-devel',
                                    'targetDir' : 'src/Moveit'
                            ]
                    ],
                    'aarch64' : [
                            [
                                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/D200/D200Robot',
                                    'url' : 'ssh://git@192.168.9.61:10022/d200/D200Robot.git',
                                    'branch' : branch,
                                    'targetDir' : 'src/D200Robot'
                            ]
                    ]
            ],
            'buildScript' : "src/D200Robot/scripts/build.sh -a ${arch} -b ${branch} -d ${distro}",
//            'packageScript' : "src/D200Robot/scripts/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
            'packageScript' : "src/D200Robot/scripts/package.sh -r D200 -b ${branch} -d ${distro} -v ${version}",
            'cleanScript' : "src/D200Robot/scripts/build.sh -c 1",
            'artifactDir' : "./",
            'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/D200/D200Robot",
            'cherryPickDir' : "src/D200Robot",
            'artifactName' : "*install_D200_${branch}_${version}.tar.gz",
            'artifactory' : "D200Robot/${arch}/${distro}",
            'cleanCmd' : "rm -rf *install_D200_${branch}_${version}.tar.gz",
            'webhookUrl' : 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=a3192560-003e-474e-bbcc-baa8eb4da1a9'
    ]


    def fg100RobotTemplate = [
        'label' : [
            'x86_64' : [
                '18.04' : "FG100_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:fg100_x86_64_18.04_v2_java17'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_xenial', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'http://192.168.9.61/fg100/robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/FG100Robot'
                ],
                [
                    'url' : 'http://192.168.9.61/slam/Slam.git',
                    'branch' : 'master',
                    'targetDir' : 'src/Slam'
                ]
            ]
        ],
        'buildScript' : "cd src/FG100Robot && git submodule update --init --recursive && cd ../.. && src/FG100Robot/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/FG100Robot/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/FG100Robot/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/fg100/robot",
        'cherryPickDir' : "src/FG100Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "FG100Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=8fae9b55-dcb9-4e6e-b7a9-656934cb9f6a'
    ]

    def e100RobotTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : "ROBOT_X86_64_14.04"
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ""
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
//                    'url' : 'ssh://gerrit@192.168.30.243:29418/E100Robot.git',
                    'url' : 'ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/E100Robot'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Slam.git',
                    'branch' : 'master',
                    'targetDir' : 'src/Slam_master'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Slam.git',
                    'branch' : 'slam_imu',
                    'targetDir' : 'src/Slam_imu'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Slam.git',
                    'branch' : '3d',
                    'targetDir' : 'src/Slam_3d'
                ]
            ]
        ],
        'buildScript' : "src/E100Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/E100Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/E100Robot/script/build.sh -c 1",
        'artifactDir' : "./",
//        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/E100Robot.git",
        'cherryPickGit' : "ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git",
        'cherryPickDir' : "src/E100Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "E100Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def z100SlamTemplate = [
        'label' : [
            'x86_64' : [
                '16.04' : "Z100_X86_64_16.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:ipc_x86_64_16.04'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_xenial', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Z100/Z100Slam',
                    'url' : 'ssh://git@192.168.9.61:10022/z100/Z100Slam.git',
                    'branch' : branch,
                    'targetDir' : 'src/Z100Slam'
                ]
            ]
        ],
        'buildScript' : "source /opt/ros/kinetic/setup.bash && catkin_make_isolated --install --use-ninja --install-space install",
        'packageScript' : "tar -zcvf Z100V20slam.tar.gz install",
        'cleanScript' : "",
        'artifactDir' : "./",
        'cherryPickGit' : "",
        'cherryPickDir' : "",
        'artifactName' : "Z100V20slam.tar.gz",
        'artifactory' : "Z100Slam/${arch}/${distro}/",
        'cleanCmd' : "rm -rf Z100V20slam.tar.gz install build_isolated devel_isolated",
        'webhookUrl' : ''
    ]

    def z100RobotTemplate = [
        'label' : [
            'x86_64' : [
                '16.04' : "Z100_X86_64_16.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '16.04' : '192.168.9.38:18082/yidao/jnlp-slave:ipc_x86_64_16.04'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '16.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_xenial', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Z100/Z100Robot',
                    'url' : 'ssh://git@192.168.9.61:10022/z100/Z100Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/Z100Robot'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Moveit',
                    'branch' : 'kinetic-devel',
                    'targetDir' : 'src/Moveit'
                ]
            ]
        ],
        'buildScript' : "bash src/Z100Robot/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "bash src/Z100Robot/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "bash src/Z100Robot/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/Z100/Z100Robot",
        'cherryPickDir' : "src/Z100Robot",
        'artifactName' : "${robot}_*_${version}.tar.gz",
        'artifactory' : "Z100Robot/${arch}/${distro}",
        'slamDir' : 'Z100Slam/x86_64/16.04/',
        'cleanCmd' : "rm -rf *.tar.gz",
        'webhookUrl' : ''
    ]

    def sa200RobotTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : 'ROBOT_X86_64_14.04'
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ""
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/SA200/SA200Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/SA200Robot'
                ]
            ]
        ],
        'buildScript' : "src/SA200Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "rm ./install/share/base/cfg/base.yaml && cp /usr/local/lib/baseA200.yaml ./install/share/base/cfg/base.yaml && cp /home/libin/workspace/param/parameterSA.yaml ./install/share/parameter/config/parameter.yaml && cp /home/libin/workspace/CameraParam/infared/magnity.yaml ./install/share/magnity/cfg/magnity.yaml && cp /home/libin/workspace/CameraParam/Colorful/hikvision.yaml ./install/share/hikvision/cfg/hikvision.yaml && cp /home/libin/workspace/CameraParam/node_manage/startup_config.txt ./install/share/node_manage/config/startup_config.txt && echo -e '\n' >> ./install/share/socket/cfg/socket.yaml && echo rosVersion: \"1.0.${version}\" >> ./install/share/socket/cfg/socket.yaml && src/SA200Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/SA200Robot/script/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/SA200/SA200Robot.git",
        'cherryPickDir' : "src/SA200Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "SA200Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def sa200RobotWithoutMagnityTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : 'ROBOT_X86_64_14.04'
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ""
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/SA200/SA200Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/SA200Robot'
                ]
            ]
        ],
        'buildScript' : "src/SA200Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "rm ./install/share/base/cfg/base.yaml && cp /usr/local/lib/baseA200.yaml ./install/share/base/cfg/base.yaml && rm ./install/share/task/cfg/task.yaml && cp ./src/SA200Robot/task/cfg/task_no_mag.yaml ./install/share/task/cfg/task.yaml && cp /home/libin/workspace/param/parameterSA.yaml ./install/share/parameter/config/parameter.yaml && cp /home/libin/workspace/CameraParam/Colorful/hikvision.yaml ./install/share/hikvision/cfg/hikvision.yaml && cp /home/libin/workspace/CameraParam/node_manage/startup_config_no_mag.txt ./install/share/node_manage/config/startup_config.txt && echo -e '\n' >> ./install/share/socket/cfg/socket.yaml && echo rosVersion: \"1.0.${version}\" >> ./install/share/socket/cfg/socket.yaml && src/SA200Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/SA200Robot/script/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/SA200/SA200Robot.git",
        'cherryPickDir' : "src/SA200Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "SA200Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def si100RobotTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : 'ROBOT_X86_64_14.04'
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'ssh://git@192.168.9.61:10022/MassProductionProject/SI100/SI100Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/SI100Robot'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Slam',
                    'branch' : 'master',
                    'targetDir' : 'src/Slam'
                ]
            ]
        ],
        'buildScript' : "src/SI100Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/SI100Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/SI100Robot/script/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/SI100/SI100Robot.git",
        'cherryPickDir' : "src/SI100Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "SI100Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

     def e300RobotTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : 'ROBOT_X86_64_14.04'
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
//                    'url' : 'ssh://gerrit@192.168.30.243:29418/E100Robot.git',
                    'url' : 'ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/E100Robot'
                ]
            ]
        ],
        'buildScript' : "src/E100Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/E100Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/E100Robot/script/build.sh -c 1",
        'artifactDir' : "./",
//        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/SI100/E100Robot.git",
        'cherryPickGit' : "ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git",
        'cherryPickDir' : "src/E100Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "E300Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def e300Robot3dTemplate = [
        'label' : [
            'x86_64' : [
                '14.04' : 'ROBOT_X86_64_14.04'
            ]
        ],
        'image' : [
            'x86_64' : [
                '14.04' : ''
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '14.04' : ""
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
//                    'url' : 'ssh://gerrit@192.168.30.243:29418/E100Robot.git',
                    'url' : 'ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git',
                    'branch' : branch,
                    'targetDir' : 'src/E100Robot'
                ],
                [
                    'url' : 'ssh://gerrit@192.168.30.243:29418/Slam.git',
                    'branch' : '3d',
                    'targetDir' : 'src/Slam_3d'
                ]
            ]
        ],
        'buildScript' : "src/E100Robot/script/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "src/E100Robot/script/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/E100Robot/script/build.sh -c 1",
        'artifactDir' : "./",
//        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/E100Robot.git",
        'cherryPickGit' : "ssh://git@192.168.9.61:10022/MassProductionProject/e-series/E100Robot.git",
        'cherryPickDir' : "src/E100Robot",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "E300Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def roboxTemplate = [
        'label' : [
            'x86_64' : [
                '18.04' : "ROBOX_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:robox_x86_64_18.04_java17'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_bionic', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/robox',
                    'url' : 'http://192.168.9.61/m100/RobotCore.git',
                    'branch' : branch,
                    'targetDir' : 'src/robox'
                ],
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Slam',
                    'url' : 'http://192.168.9.61/slam/Slam.git',
//                    'url' : 'http://192.168.9.61/slam/Slam.git',
                    'branch' : 'slam_imu',
                    'targetDir' : 'src/Slam'
                ]
            ]
        ],
        'buildScript' : "cd src/robox && git submodule update --init --recursive && cd ../.. && bash src/robox/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "bash src/robox/package.sh -r ${robot} -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/robox/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "ssh://gerrit@192.168.30.243:29418/robox",
        'cherryPickDir' : "src/robox",
        'artifactName' : "*install_${robot}_${branch}_${version}.tar.gz",
        'artifactory' : "Robox/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_${robot}_${branch}_${version}.tar.gz",
        'webhookUrl' : 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=2e0519c5-2763-48eb-8432-df2d285e6378'
    ]

    def integrated_navigation = [
        'label' : [
            'x86_64' : [
                '18.04' : "NAVIGATION_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:robox_x86_64_18.04'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_bionic', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    // 'url' : 'ssh://gerrit@192.168.30.243:29418/Multi-Sensor/integrated_navigation',
                    'url' : 'ssh://git@192.168.9.61:10022/integrated_navigation/integrated_navigation1.git',
                    'branch' : branch,
                    'targetDir' : 'src/integrated_navigation'
                ]
            ]
        ],
        'buildScript' : "source /opt/ros/melodic/setup.bash && catkin_make -DCMAKE_BUILD_TYPE=Release install",
        'packageScript' : "tar cvf install.tar install/",
        'cleanScript' : "rm -rf build devel install",
        'artifactDir' : "./",
        'cherryPickGit' : "",
        'cherryPickDir' : "",
        'artifactName' : "install.tar",
        'artifactory' : "Z200Robot/${arch}/${distro}",
        'cleanCmd' : "rm -rf install.tar",
        'webhookUrl' : ''
    ]

    def roboxTemplate0822 = [
        'label' : [
            'x86_64' : [
                '18.04' : "ROBOX_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:robox_x86_64_18.04_java17'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_bionic', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'http://192.168.9.53/robox/robox_0822.git',
                    'branch' : branch,
                    'targetDir' : 'src/robox'
                ],
                // [
                //     'url' : 'http://192.168.9.53/navigation/EP100.git',
                //     'branch' : 'M100',
                //     'targetDir' : 'src/robox/EP100'
                // ],
                [
                    'url' : 'http://192.168.9.53/slam/slam.git',
                    'branch' : 'slam_imu',
                    'targetDir' : 'src/Slam'
                ]
            ]
        ],
        'buildScript' : "bash src/robox/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "bash src/robox/package.sh -r robox -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/robox/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "",
        'cherryPickDir' : "",
        'artifactName' : "*install_robox_${branch}_${version}.tar.gz",
        'artifactory' : "Robox/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_robox_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def roboxM100Template = [
        'label' : [
            'x86_64' : [
                '18.04' : "ROBOX_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:robox_x86_64_18.04_java17'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_bionic', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'http://192.168.9.61/robox/m100.git',
                    'branch' : branch,
                    'targetDir' : 'src'
                ],
                // [
                //     'url' : 'http://192.168.9.53/navigation/EP100.git',
                //     'branch' : 'M100',
                //     'targetDir' : 'src/robox/EP100'
                // ],
                // [
                //     'url' : 'http://192.168.9.53/slam/slam.git',
                //     'branch' : 'slam_imu',
                //     'targetDir' : 'src/Slam'
                // ]
            ]
        ],
        'buildScript' : "bash src/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "bash src/package.sh -r robox -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "",
        'cherryPickDir' : "",
        'artifactName' : "*install_robox_${branch}_${version}.tar.gz",
        'artifactory' : "Robox/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_robox_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]

    def roboxE100Template = [
        'label' : [
            'x86_64' : [
                '18.04' : "ROBOX_X86_64_18.04_${version}"
            ]
        ],
        'image' : [
            'x86_64' : [
                '18.04' : '192.168.9.38:18082/yidao/jnlp-slave:robox_x86_64_18.04_java17_cppad_opencv_4.5.2'
            ]
        ],
        'volumes' : [
            'x86_64' : [
                '18.04' : [hostPathVolume(hostPath: '/data/nfs/workspace/x86_bionic', mountPath: '/home/jenkins/agent/workspace')]
            ]
        ],
        'gitUrl' : [
            'x86_64' : [
                [
                    'url' : 'http://192.168.9.61/robox/e100.git',
                    'branch' : branch,
                    'targetDir' : 'src'
                ],
                // [
                //     'url' : 'http://192.168.9.53/navigation/EP100.git',
                //     'branch' : 'M100',
                //     'targetDir' : 'src/robox/EP100'
                // ],
                // [
                //     'url' : 'http://192.168.9.53/slam/slam.git',
                //     'branch' : 'slam_imu',
                //     'targetDir' : 'src/'
                // ]
            ]
        ],
        'buildScript' : "bash src/build.sh -a ${arch} -b ${branch} -d ${distro}",
        'packageScript' : "bash src/package.sh -r robox -b ${branch} -d ${distro} -v ${version}",
        'cleanScript' : "src/build.sh -c 1",
        'artifactDir' : "./",
        'cherryPickGit' : "",
        'cherryPickDir' : "",
        'artifactName' : "*install_robox_${branch}_${version}.tar.gz",
        'artifactory' : "Robox/${arch}/${distro}",
        'cleanCmd' : "rm -rf *install_robox_${branch}_${version}.tar.gz",
        'webhookUrl' : ''
    ]
    

    def buildTemplate = [
        'D200' : d200RobotTemplate,
        'D2002' : d200RobotTemplate2,
        'E100' : e100RobotTemplate,
        'FG100' : fg100RobotTemplate,
        'Z100Slam' : z100SlamTemplate,
        'Z100' : z100RobotTemplate,
        'SA200' : sa200RobotTemplate,
        'SA200WithoutMagnity' : sa200RobotWithoutMagnityTemplate,
        'SI100' : si100RobotTemplate,
        'E300' : e300RobotTemplate,
        'E3003d' : e300Robot3dTemplate,
        'robox' : roboxTemplate,
        'navigation' : integrated_navigation,
        'robox0822' : roboxTemplate0822,
        'roboxE100Template' : roboxE100Template,
        'roboxM100Template' : roboxM100Template
     ]

    return buildTemplate.get(robot)

}